<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
function formNewCode(comCd) 
{
	var params = (comCd == undefined) ? "" : "&comCd=" + comCd;
	
	var url = "/manage/code/form?catCd=${categoryCd}" + params;
	enco.log("url : " + url);	
	openWin(url, "새로운 공통코드 등록", 520, 400);
}
</script>
</head>

<body>
<div class="content_top">
	<p class="path">
		<strong>${categoryCd}: 세부코드관리</strong>
	</p>
</div>

<div class="div_left">
Total : <b id="total">${codeCount}</b> 건
</div>

<div class="div_right">
	<a href="javascript:;" class="btn_sml" onclick="formNewCode();"><span>새로운 코드 등록</span></a>
	<a href="/manage/category" class="btn_sml"><span>목록보기</span></a>
</div>
<br>
<br>

<div class="tbl_type1">
	<table cellspacing="0" border="1">
		<col width="100">
		<col width="150">
		<col>
		<col width="85">
		<col width="85">
		<col width="85">
		<col width="85">
		<col width="40">
		
		<thead>
		<tr>
			<th>공통코드</th>
			<th>공통코드명</th>
			<th>비고</th>
			<th>사용여부</th>
			<th>등록일시</th>
			<th>등록자</th>
			<th><img src="/share/img/edit.gif"></th>
		</tr>
		</thead>
		
		<tbody>
		<c:forEach items="${codeList}" var="item">
		<tr>
			<td>${item.commonCd}</td>
			<td>${item.commonNm}</td>
			<td>${item.commonDesc}</td>
			<td align="center">${item.useYn}</td>
			<td align="center">${item.registDate}</td>
			<td align="center">${item.registEmpNo}</td>
			<td align="center"><a href="#" onclick="formNewCode('${item.commonCd}');"><img src="/share/img/edit.gif"></a></td>
		</tr>
		</c:forEach>
		<c:if test="${empty codeList}">
		<tr>
			<td colspan="7" align="center">검색한 데이터가 없습니다.</td>
		</tr>
		</c:if>
		</tbody>
	</table>
</div>

<br>
<div class="div_right">
	<a href="javascript:;" class="btn_sml" onclick="formNewCode();"><span>새로운 코드 등록</span></a>
	<a href="/manage/category" class="btn_sml"><span>목록보기</span></a>
</div>
</body>
</html>